/*
 * SharedMemory.c
 *
 *  Created on: Mar 8, 2012
 *      Author: 234
 */

#include "Simulator.h"

void mem1Up(SharedMemory* m) {
	m->memory1 = m->memory1++;
}

void mem1Down(SharedMemory* m){
	m->memory1 = m->memory1--;
}

int mem2Read(SharedMemory* m){
	return m->memory2;
}

void mem2Write(SharedMemory* m, int val){
	m->memory2 = val;
}

int isLocked(SharedMemory* m) {
	return m->locked;
}
